package com.example.springbootlucenedemo.bean;

import com.example.springbootlucenedemo.common.lucene.annotation.StringField;
import com.example.springbootlucenedemo.common.lucene.annotation.TextField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.apache.lucene.document.Field;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity
@Table(name = "tb_users_info")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class TbUsersInfo implements Serializable {
    @Id
    @StringField(fieldStore = Field.Store.YES)
    private String user_id;

    /**
     * 中文姓
     */
    @Column
    @TextField(fieldStore = Field.Store.YES)
    private String firstname_cn;

    /**
     * 中文名
     */
    @Column
    @TextField(fieldStore = Field.Store.YES)
    private String lastname_cn;
    /**
     * 中文姓拼音
     */
    @Column
    @TextField(fieldStore = Field.Store.YES)
    private String first_pingyin;
    /**
     * 中文名拼音
     */
    @Column
    @TextField(fieldStore = Field.Store.YES)
    private String last_pingyin;

}
